import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns

# import Data and clean
data = pd.read_csv('../../99 文件目录/1955年至2020年的国家人口.csv', na_values=['United States']).dropna()

# 过滤出2015,17,19年三个国家的数据
data = data[data['Year'].isin([2015, 2017, 2019])
            & data['Country'].isin(['China', 'Russia', 'India'])]

# 按国家分组展示
sns.barplot(x='Year', y='Population', hue='Country', data=data)
plt.show()
